package com.study.a07threadmethod1;

public class ThreadDemo {
    public static void main(String[] args) throws InterruptedException {



    MyThread t=new MyThread();
    t.setName("线程1");
     t.start();

     //把t插入当前线程之前
     t.join();

     // 主线程
     for (int i = 0; i < 10; i++) {
            System.out.println("main线程@" + i);
        }

}
}